//
//  LTY_ShakeView.m
//  MooMusic
//
//  Created by 守护神 on 15/10/26.
//  Copyright (c) 2015年 wjy. All rights reserved.
//

#import "LTY_ShakeView.h"

@implementation LTY_ShakeView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    
    return self;
}

- (void)creatView
{
    self.namelabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.frame.size.width, self.frame.size.width, 30)];
    //self.namelabel.backgroundColor = [UIColor greenColor];
    self.namelabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.namelabel];
    
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREENWIDTH/2.0, SCREENWIDTH/2.0)];
    self.imageView.center = CGPointMake(self.frame.size.width/2.0, self.frame.size.width/2.0);
    //self.imageView.backgroundColor = [UIColor orangeColor];
    [self addSubview:self.imageView];
    

}

- (void)setModel:(LTY_ShakeModel *)model
{
    _model = model;
    self.imageView.image = [UIImage imageNamed:@"mv_big_cover_default.jpg"];
    self.namelabel.text = model.name;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
